plot(s, type="l")
plot(s, type="l", log="xy")
time = 1:t
lm(log(s) ~ time )
r = lm(log(s) ~ time )
sqrt(2)
r = lm(log(s) ~ log(time) )
summary(r)
source('~/Desktop/Time Transformation/time workbook.R')
summary(r)$r.squared
source('~/Desktop/Time Transformation/time workbook.R')
source('~/Desktop/Time Transformation/time workbook.R')
source('~/Desktop/Time Transformation/time workbook.R')
source('~/Desktop/Time Transformation/time workbook.R')
plot(s/sd, type="l", log="xy")
source('~/Desktop/Time Transformation/time workbook.R')
source('~/Desktop/Time Transformation/time workbook.R')
source('~/Desktop/Time Transformation/time workbook.R')
hist(f[t,])
hist(f[t,], breaks = 100)
source('~/Desktop/Time Transformation/time workbook.R')
summary(r)$r.squared
library(VGAM)
f[1,] = rlaplace(n, 1, sd)
View(f)
source('~/Desktop/Time Transformation/time workbook.R')
hist(f[1,], breaks = 100)
hist(f[10,], breaks = 100)
hist(f[30,], breaks = 100)
hist(f[5,], breaks = 100)
source('~/Desktop/Time Transformation/time workbook.R')
hist(f[1,], breaks = 100)
hist(f[2,], breaks = 100)
hist(f[3,], breaks = 100)
hist(f[4,], breaks = 100)
hist(f[5,], breaks = 100)
hist(f[50,], breaks = 100)
hist(f[50,], breaks = 100, xlim = c(0,2))
hist(f[1,], breaks = 100, xlim = c(0,2))
hist(f[10,], breaks = 100, xlim = c(0,2))
source('~/Desktop/Time Transformation/time workbook.R')
hist(f[10,], breaks = 100, xlim = c(0,2))
hist(f[10,], breaks = 100, xlim = c(0,10))
hist(f[1,], breaks = 100, xlim = c(0,10))
hist(f[3,], breaks = 100, xlim = c(0,10))
hist(f[20,], breaks = 100, xlim = c(0,10))
hist(f[20,], breaks = 500, xlim = c(0,10))
hist(f[40,], breaks = 500, xlim = c(0,10))
hist(f[40,], breaks = 1000, xlim = c(0,10))
source('~/Desktop/Time Transformation/time workbook.R')
hist(f[40,], breaks = 1000, xlim = c(0,10))
hist(f[1,], breaks = 1000, xlim = c(0,10))
hist(f[2,], breaks = 1000, xlim = c(0,10))
source('~/Desktop/Time Transformation/time workbook.R')
source('~/Desktop/Time Transformation/time workbook.R')
hist(f[20,], breaks = 1000, xlim = c(0,10))
log(10)
source('~/Desktop/Time Transformation/time workbook.R')
hist(f[40,], breaks = 1000, xlim = c(0,10))
plot(density(f[10))
plot(density(f[10,]))
lines(density(f[50,]))
plot(density(f[10,]), col="blue")
lines(density(f[50,]), col="red")
plot(density(f[10,]), col="blue", xlim =c(0,10))
lines(density(f[50,]), col="red")
plot(density(f[10,]), col="blue", xlim =c(0,10))
lines(density(f[60,]), col="red")
plot(density(f[10,]), col="blue", xlim =c(0,10))
lines(density(f[80,]), col="red")
plot(density(f[4,]), col="blue", xlim =c(0,10))
lines(density(f[80,]), col="red")
abline(x=1)
abline(v=1)
plot(density(f[4,]), col="blue", xlim =c(0,10))
lines(density(f[90,]), col="red")
abline(v=1)
source('~/Desktop/Time Transformation/time workbook.R')
plot(density(f[4,]), col="blue", xlim =c(0,6))
lines(density(f[90,]), col="red")
abline(v=1)
source('~/Desktop/Time Transformation/time workbook.R')
source('~/Desktop/Time Transformation/time workbook.R')
source('~/Desktop/Time Transformation/time workbook.R')
source('~/Desktop/Time Transformation/time workbook.R')
source('~/Desktop/Time Transformation/time workbook.R')
source('~/Desktop/Time Transformation/time workbook.R')
source('~/Desktop/Time Transformation/time workbook.R')
source('~/Desktop/Time Transformation/time workbook.R')
source('~/Desktop/Time Transformation/time workbook.R')
plot(density(f[1,]), col="blue", xlim =c(0,6), ylim = c(0,4))
lines(density(f[90,]), col="red")
plot(density(f[1,]), col="blue", xlim =c(0,6), ylim = c(0,5))
lines(density(f[90,]), col="red")
plot(density(f[1,]), col="blue", xlim =c(0,6), ylim = c(0,9))
lines(density(f[90,]), col="red")
plot(density(f[1,]), col="blue", xlim =c(0,6), ylim = c(0,7))
lines(density(f[90,]), col="red")
source('~/Desktop/Time Transformation/time workbook.R')
source('~/Desktop/Time Transformation/time workbook.R')
source('~/Desktop/Time Transformation/time workbook.R')
plot(density(f[1,]), col="blue", xlim =c(0,6), ylim = c(0,7))
lines(density(f[90,]), col="red")
abline(v=1)
source('~/Desktop/Time Transformation/time workbook.R')
source('~/Desktop/Time Transformation/time workbook.R')
source('~/Desktop/Time Transformation/time workbook.R')
plot(density(f[1,]), col="blue", xlim =c(0,6), ylim = c(0,4))
lines(density(f[90,]), col="red")
source('~/Desktop/Time Transformation/time workbook.R')
source('~/Desktop/Time Transformation/time workbook.R')
plot(density(f[1,]), col="blue", ylim = c(0,3), log="x")
lines(density(f[90,]), col="red")
source('~/Desktop/Time Transformation/time workbook.R')
plot(density(f[1,]), col="blue", xlim =c(0,6))
lines(density(f[90,]), col="red")
abline(v=1)
source('~/Desktop/Time Transformation/time workbook.R')
source('~/Desktop/Time Transformation/time workbook.R')
x = 1:1000
y = exp(exp(x))
plot(x,y, log="xy")
y = exp(exp(-x))
plot(x,y, log="xy")
x = seq(-5,5 length.out = 1000)
y = exp(exp(-x^2))
plot(x,y, log="xy")
y = exp(exp(-0.001x^2))
plot(x,y, log="xy")
y = exp(exp(-0.001x^2))
x = seq(-5,5 length.out = 10000)
y = exp(exp(-0.001x^2))
x = seq(-5,5 length.out = 10000)
x = seq(-5,5, length.out = 10000)
y = exp(exp(-0.001x^2))
plot(x,y, log="xy")
x = seq(-5,5, length.out = 10000)
y = exp(exp(-0.001x^2))
y = exp(exp(-0.001*x^2))
plot(x,y, log="xy")
x = seq(-5,5, length.out = 10000)
y = exp(exp(-0.1*x^2))
plot(x,y, log="xy")
y =100*exp(exp(-0.1*x^2))
plot(x,y, log="xy")
x = seq(-5,5, length.out = 10000)
y = exp(exp(-0.1*x^2))
y = dnorm(x, 0, 1)
y = exp(exp(-0.1*x^2))
plot(x,y, log="xy")
hist(y)
x = seq(-5,5, length.out = 10000)
y = dnorm(x, 0, 1)
y = exp(-x^2)
plot(x,y, log="xy")
summary(y)
x = seq(-5,5, length.out = 1000)
y = dnorm(x, 0, 0.01)
y = exp(-x^2)
summary(y)
y = exp(-x^2)
plot(x,y, log="xy")
summary(y)
y = dnorm(x, 0, 0.01)
z = exp(-x^2)
plot(z, log="xy")
plot(z, log="x")
x = seq(0,5, length.out = 1000)
x = seq(0,5, length.out = 1000)
y = exp(-x)
z = exp(z)
x = seq(0,5, length.out = 1000)
y = exp(-x)
z = exp(y)
plot(z)
plot(z, log=xy)
plot(z, log="xy")
plot(z, log="x")
plot(x,z, log="x")
plot(x, z, log="xy")
x = seq(-5,5, length.out = 1000)
y = dnorm(x, 0, 0.01)
z = exp(-x^2)
plot(z, log="x")
x = seq(1,5, length.out = 1000)
y = exp(-x)
z = exp(y)
plot(x, z, log="xy")
x = seq(1,5, length.out = 1000)
y = exp(-x)
z = exp(y)
plot(x, z, log="xy")
x = seq(1,100, length.out = 1000)
y = exp(-x)
z = exp(y)
plot(x, z, log="xy")
x = seq(-5,5, length.out = 1000)
y = dnorm(x, 0, 0.01)
z = exp(-x^2)
plot(z, log="x")
x = seq(1,100, length.out = 1000)
y = exp(-x)
z = exp(y)
plot(x, z, log="xy")
x = seq(-5,5, length.out = 1000)
y = dnorm(x, 0, 0.01)
z = exp(-y)
plot(z, log="x")
x = seq(-5,5, length.out = 1000)
y = dnorm(x, 0, 0.01)
z = exp(y)
plot(z, log="x")
z = exp(-x^2)
plot(z, log="x")
x = seq(-5,5, length.out = 1000)
z = exp(-x^2)
plot(z, log="x")
x = seq(-5,5, length.out = 1000)
z = exp(-x^2)
plot(z)
y = exp(-x^2)
z = exp(y)
plot(z)
x = seq(-5,5, length.out = 1000)
y = exp(-x^2)
z = exp(y)
plot(z)
plot(z, log="xy")
x = rnorm(10^5, 0, 10)
y = abs(x)
plot(density(y))
plot(density(y), log=x)
plot(density(y), log="x")
x = rnorm(10^5, 0, 100)
y = abs(x)
plot(density(y), log="x")
x = rnorm(10^5, 0, 100)
y = abs(x)
plot(density(y))
hist(y, breaks = 100)
plot(density(y), log="y")
x = rnorm(10^6, 0, 100)
y = abs(x)
plot(density(y), log="y")
x = rnorm(10^6, 0, 10)
y = abs(x)
plot(density(y), log="y")
x = rnorm(10^6, 0, 400)
y = abs(x)
plot(density(y), log="y")
x = rnorm(10^6, 0, 10000)
y = abs(x)
plot(density(y), log="y")
line(density(x))
plot(density(y), log="y")
line(density(x))
lines(density(x))
plot(density(y), log="y")
lines(density(x), col="red")
x = rnorm(10^6, 0, 10000)
y = abs(x)
plot(density(y), log="y")
lines(density(x), col="red")
setwd("~/Desktop/Span of Control")
s = read.csv("Span.csv")
View(s)
s = read.csv("Span.csv", header = F)
View(s)
d = s[3:13]
View(d)
s = read.csv("Span.csv", header = F)
d = s[3:13,]
View(d)
test = melt(d)
library(reshape2)
test = melt(d)
View(test)
test = as.vector(d)
d = as.numeric(d)
d = as.numeric(as.character(d))
d = s[3:13,]
d = as.character(d)
d
test = apply(d, 3, as.character)
d = s[3:13,]
test = apply(d, 3, as.character)
d = s[3:13,]
test = apply(d, 3, as.character(d))
d = s[3:13,]
test = apply(d, 3, as.character())
d = s[3:13,]
test =  lapply(d, function(x) as.numeric(as.character(x)))
test = as.matrix(test)
View(test)
d = s[3:13,]
d = s[3:13,]
test = sapply(d, as.character)
View(test)
test = saplly(d, as.numeric())
test = sapply(d, as.numeric())
test = sapply(d, as.numeric)
View(test)
d = s[3:13,]
test = sapply(d, as.character)
test = sapply(test, as.numeric)
test
source('~/Desktop/Span of Control/span workbook.R')
source('~/Desktop/Span of Control/span workbook.R')
d = s[3:13,-1]
View(d)
source('~/Desktop/Span of Control/span workbook.R')
d = s[3:13,-1]
l = length(d[1,])
source('~/Desktop/Span of Control/span workbook.R')
source('~/Desktop/Span of Control/span workbook.R')
View(result)
source('~/Desktop/Span of Control/span workbook.R')
View(result)
source = s[1,]
View(source)
s = read.csv("Span.csv", header = F, stringsAsFactors = F)
source('~/Desktop/Span of Control/span workbook.R')
source('~/Desktop/Span of Control/span workbook.R')
View(result)
source('~/Desktop/Span of Control/span workbook.R')
View(result)
source =s[1,]
View(s)
View(result)
View(s)
source('~/Desktop/Span of Control/span workbook.R')
length(2:12)
sources = rep(sources, 11)
sources =s[1,-1]
sources = rep(sources, 11)
source('~/Desktop/Span of Control/span workbook.R')
View(result)
source('~/Desktop/Span of Control/span workbook.R')
sources =s[1,-1]
View(sources)
sources = as.vector(sources)
sources = vector(sources)
sources = matrix(sources)
View(sources)
source('~/Desktop/Span of Control/span workbook.R')
sources =s[1,-1]
sources =s[1,-1]
sources = t(sources)
View(sources)
sources =s[1,-1]
sources = t(sources)
View(sources)
sources  = as.vector(sources)
source('~/Desktop/Span of Control/span workbook.R')
source('~/Desktop/Span of Control/span workbook.R')
View(result)
source('~/Desktop/Span of Control/span workbook.R')
View(result)
sources =s[1,-1]
sources = t(sources)
source('~/Desktop/Span of Control/span workbook.R')
View(result)
year =s[2,-1]
View(year)
source('~/Desktop/Span of Control/span workbook.R')
View(result)
source('~/Desktop/Span of Control/span workbook.R')
source('~/Desktop/Span of Control/span workbook.R')
span.plot
result = na.omit(result)
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
hist(result$span)
hist(result$span, breaks = 20)
summary(result$span)
span.plot
model = data.frame(x = c(0,10), y = c(2,6.5))
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
View(model)
model = data.frame(x = c(0,10), y = c(2,6.5))
span.plot = ggplot() +
geom_ribbon(data = model, aes(x = x, y=y))
span.plot
model = data.frame(x = c(0,10), ymin = 2, ymax = 6.5)
View(model)
source('~/Desktop/Span of Control/span workbook.R')
span.plot
span.plot = ggplot() +
geom_ribbon(data = model, aes(x = x, ymin = ymin, ymax = ymax))
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
span.plot
source('~/Desktop/Span of Control/span workbook.R')
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Span of Control/span workbook.R')
span.plot
source('~/Desktop/Empirical Research/Plots/Energy and Institution Size/Span of Control Revised/Span workbook II.R')
source('~/Desktop/Empirical Research/Income Distribution/Gini Ratio/Hierarchical Levels/Empirical/Aggregate Studies/Data Merge.R')
source('~/Desktop/Empirical Research/Income Distribution/Gini Ratio/Hierarchical Levels/Empirical/Aggregate Studies/Data Merge.R')
dir = dirname(rstudioapi::getActiveDocumentContext()$path)
dir
library(readr)
dir = dirname(rstudioapi::getActiveDocumentContext()$path)
workspace = paste(dir, "/Ariga", sep = "")
setwd(workspace)
ariga = read_csv("Ariga Data.csv")
dir = dirname(rstudioapi::getActiveDocumentContext()$path)
workspace = paste(dir, "/Bell", sep = "")
setwd(workspace)
bell = read_csv("Bell Data.csv")
dir = dirname(rstudioapi::getActiveDocumentContext()$path)
workspace = paste(dir, "/Eriksson", sep = "")
setwd(workspace)
eriksson = read_csv("Eriksson Data.csv")
dir = dirname(rstudioapi::getActiveDocumentContext()$path)
workspace = paste(dir, "/Heyman", sep = "")
setwd(workspace)
dir = dirname(rstudioapi::getActiveDocumentContext()$path)
workspace = paste(dir, "/Heyman", sep = "")
setwd(workspace)
heyman = read_csv("Heyman Data.csv")
dir = dirname(rstudioapi::getActiveDocumentContext()$path)
workspace = paste(dir, "/Leonard", sep = "")
setwd(workspace)
leonard = read_csv("Leonard Data.csv")
dir = dirname(rstudioapi::getActiveDocumentContext()$path)
workspace = paste(dir, "/Main", sep = "")
setwd(workspace)
main = read_csv("Main Data.csv")
dir = dirname(rstudioapi::getActiveDocumentContext()$path)
workspace = paste(dir, "/Mueller/Raw Data", sep = "")
mueller = read_csv("Mueller Data.csv")
dir
dir = dirname(rstudioapi::getActiveDocumentContext()$path)
workspace = paste(dir, "/Mueller/Raw Data", sep = "")
mueller = read_csv("Mueller Data.csv")
dir = dirname(rstudioapi::getActiveDocumentContext()$path)
workspace = paste(dir, "/Mueller/Raw Data", sep = "")
setwd(workspace)
mueller = read_csv("Mueller Data.csv")
dir = dirname(rstudioapi::getActiveDocumentContext()$path)
workspace = paste(dir, "/Rajan", sep = "")
setwd(workspace)
rajan = read_csv("Rajan Data.csv")
source('~/Desktop/Empirical Research/Income Distribution/Gini Ratio/Hierarchical Levels/Empirical/Aggregate Studies/Data Merge.R')
